<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Nodes info API | ElasticSearch 7.7 权威指南中文版</title>
	<meta name="keywords" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <meta name="description" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" type="text/css" href="../static/styles.css" />
	<script>
	var _link = 'cluster-nodes-info.html';
    </script>
</head>
<body>
<div class="main-container">
    <section id="content">
        <div class="content-wrapper">
            <section id="guide" lang="zh_cn">
                <div class="container">
                    <div class="row">
                        <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                            <div style="color:gray; word-break: break-all; font-size:12px;">原英文版地址: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.7/cluster-nodes-info.html" rel="nofollow" target="_blank">https://www.elastic.co/guide/en/elasticsearch/reference/7.7/cluster-nodes-info.html</a>, 原文档版权归 www.elastic.co 所有<br/>本地英文版地址: <a href="../en/cluster-nodes-info.html" rel="nofollow" target="_blank">../en/cluster-nodes-info.html</a></div>
                        <!-- start body -->
                  <div class="page_header">
<strong>重要</strong>: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html" rel="nofollow">当前版本文档</a>。
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch Guide [7.7]</a></span>
»
<span class="breadcrumb-link"><a href="rest-apis.html">REST APIs</a></span>
»
<span class="breadcrumb-link"><a href="cluster.html">Cluster APIs</a></span>
»
<span class="breadcrumb-node">Nodes info API</span>
</div>
<div class="navheader">
<span class="prev">
<a href="cluster-nodes-hot-threads.html">« Nodes hot threads API</a>
</span>
<span class="next">
<a href="cluster-nodes-reload-secure-settings.html">Nodes reload secure settings API »</a>
</span>
</div>
<div class="section">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="cluster-nodes-info"></a>Nodes info API<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cluster/nodes-info.asciidoc">edit</a>
</h2>
</div></div></div>

<p>Returns cluster nodes information.</p>
<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="cluster-nodes-info-api-request"></a>Request<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cluster/nodes-info.asciidoc">edit</a>
</h3>
</div></div></div>
<p><code class="literal">GET /_nodes</code><br></p>
<p><code class="literal">GET /_nodes/&lt;node_id&gt;</code><br></p>
<p><code class="literal">GET /_nodes/&lt;metric&gt;</code><br></p>
<p><code class="literal">GET /_nodes/&lt;node_id&gt;/&lt;metric&gt;</code></p>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="cluster-nodes-info-api-desc"></a>Description<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cluster/nodes-info.asciidoc">edit</a>
</h3>
</div></div></div>
<p>The cluster nodes info API allows to retrieve one or more (or all) of
the cluster nodes information. All the nodes selective options are explained
<a class="xref" href="cluster.html#cluster-nodes" title="Node specification">here</a>.</p>
<p>By default, it returns all attributes and core settings for a node.</p>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="cluster-nodes-info-api-path-params"></a>Path parameters<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cluster/nodes-info.asciidoc">edit</a>
</h3>
</div></div></div>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">&lt;metric&gt;</code>
</span>
</dt>
<dd>
<p>
(Optional, string) Limits the information returned to the specific metrics.
A comma-separated list of the following options:
</p>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">http</code>
</span>
</dt>
<dd>
HTTP connection information.
</dd>
<dt>
<span class="term">
<code class="literal">ingest</code>
</span>
</dt>
<dd>
Statistics about ingest preprocessing.
</dd>
<dt>
<span class="term">
<code class="literal">jvm</code>
</span>
</dt>
<dd>
JVM stats, memory pool information, garbage collection, buffer pools, number
of loaded/unloaded classes.
</dd>
<dt>
<span class="term">
<code class="literal">os</code>
</span>
</dt>
<dd>
Operating system stats, load average, mem, swap.
</dd>
<dt>
<span class="term">
<code class="literal">plugins</code>
</span>
</dt>
<dd>
<p>
Details about the installed plugins and modules per node. The following
information are available for each plugin and module:
</p>
<hr>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<code class="literal">name</code>: plugin name
</li>
<li class="listitem">
<code class="literal">version</code>: version of Elasticsearch the plugin was built for
</li>
<li class="listitem">
<code class="literal">description</code>: short description of the plugin’s purpose
</li>
<li class="listitem">
<code class="literal">classname</code>: fully-qualified class name of the plugin’s entry point
</li>
<li class="listitem">
<code class="literal">has_native_controller</code>: whether or not the plugin has a native controller
		process
---
</li>
</ul>
</div>
</dd>
<dt>
<span class="term">
<code class="literal">process</code>
</span>
</dt>
<dd>
Process statistics, memory consumption, cpu usage, open file descriptors.
</dd>
<dt>
<span class="term">
<code class="literal">settings</code>
</span>
</dt>
<dt>
<span class="term">
<code class="literal">thread_pool</code>
</span>
</dt>
<dd>
Statistics about each thread pool, including current size, queue and
rejected tasks
</dd>
<dt>
<span class="term">
<code class="literal">transport</code>
</span>
</dt>
<dd>
Transport statistics about sent and received bytes in cluster communication.
</dd>
</dl>
</div>
</dd>
<dt>
<span class="term">
<code class="literal">&lt;node_id&gt;</code>
</span>
</dt>
<dd>
(Optional, string) Comma-separated list of node IDs or names used to limit
returned information.
</dd>
</dl>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="cluster-nodes-info-api-response-body"></a>Response body<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cluster/nodes-info.asciidoc">edit</a>
</h3>
</div></div></div>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">build_hash</code>
</span>
</dt>
<dd>
Short hash of the last git commit in this release.
</dd>
<dt>
<span class="term">
<code class="literal">host</code>
</span>
</dt>
<dd>
The node’s host name.
</dd>
<dt>
<span class="term">
<code class="literal">ip</code>
</span>
</dt>
<dd>
The node’s IP address.
</dd>
<dt>
<span class="term">
<code class="literal">name</code>
</span>
</dt>
<dd>
The node’s name.
</dd>
<dt>
<span class="term">
<code class="literal">total_indexing_buffer</code>
</span>
</dt>
<dd>
Total heap allowed to be used to hold recently indexed
documents before they must be written to disk.  This size is
a shared pool across all shards on this node, and is
  controlled by <a class="xref" href="indexing-buffer.html" title="Indexing buffer settings">Indexing Buffer settings</a>.
</dd>
<dt>
<span class="term">
<code class="literal">total_indexing_buffer_in_bytes</code>
</span>
</dt>
<dd>
Same as <code class="literal">total_indexing_buffer</code>, but expressed in bytes.
</dd>
<dt>
<span class="term">
<code class="literal">transport_address</code>
</span>
</dt>
<dd>
Host and port where transport HTTP connections are accepted.
</dd>
<dt>
<span class="term">
<code class="literal">version</code>
</span>
</dt>
<dd>
Elasticsearch version running on this node.
</dd>
</dl>
</div>
<p>The <code class="literal">os</code> flag can be set to retrieve information that concern the operating
system:</p>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">os.refresh_interval_in_millis</code>
</span>
</dt>
<dd>
Refresh interval for the OS statistics
</dd>
<dt>
<span class="term">
<code class="literal">os.name</code>
</span>
</dt>
<dd>
Name of the operating system (ex: Linux, Windows, Mac OS X)
</dd>
<dt>
<span class="term">
<code class="literal">os.arch</code>
</span>
</dt>
<dd>
Name of the JVM architecture (ex: amd64, x86)
</dd>
<dt>
<span class="term">
<code class="literal">os.version</code>
</span>
</dt>
<dd>
Version of the operating system
</dd>
<dt>
<span class="term">
<code class="literal">os.available_processors</code>
</span>
</dt>
<dd>
Number of processors available to the Java virtual machine
</dd>
<dt>
<span class="term">
<code class="literal">os.allocated_processors</code>
</span>
</dt>
<dd>
 The number of processors actually used to calculate thread pool size. This
number can be set with the <code class="literal">processors</code> setting of a node and defaults to
the number of processors reported by the OS. In both cases this number will
never be larger than 32.
</dd>
</dl>
</div>
<p>The <code class="literal">process</code> flag can be set to retrieve information that concern the current
running process:</p>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">process.refresh_interval_in_millis</code>
</span>
</dt>
<dd>
Refresh interval for the process statistics
</dd>
<dt>
<span class="term">
<code class="literal">process.id</code>
</span>
</dt>
<dd>
Process identifier (PID)
</dd>
<dt>
<span class="term">
<code class="literal">process.mlockall</code>
</span>
</dt>
<dd>
Indicates if the process address space has been successfully locked in memory
</dd>
</dl>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="cluster-nodes-info-api-query-params"></a>Query parameters<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cluster/nodes-info.asciidoc">edit</a>
</h3>
</div></div></div>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">flat_settings</code>
</span>
</dt>
<dd>
(Optional, boolean) If <code class="literal">true</code>, returns settings in flat format. Defaults to
<code class="literal">false</code>.
</dd>
<dt>
<span class="term">
<code class="literal">master_timeout</code>
</span>
</dt>
<dd>
(Optional, <a class="xref" href="common-options.html#time-units" title="Time units">time units</a>) Specifies the period of time to wait for
a connection to the master node. If no response is received before the timeout
expires, the request fails and returns an error. Defaults to <code class="literal">30s</code>.
</dd>
<dt>
<span class="term">
<code class="literal">timeout</code>
</span>
</dt>
<dd>
(Optional, <a class="xref" href="common-options.html#time-units" title="Time units">time units</a>) Specifies the period of time to wait for
a response. If no response is received before the timeout expires, the request
fails and returns an error. Defaults to <code class="literal">30s</code>.
</dd>
</dl>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="cluster-nodes-info-api-example"></a>Examples<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cluster/nodes-info.asciidoc">edit</a>
</h3>
</div></div></div>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console"># return just process
GET /_nodes/process

# same as above
GET /_nodes/_all/process

# return just jvm and process of only nodeId1 and nodeId2
GET /_nodes/nodeId1,nodeId2/jvm,process

# same as above
GET /_nodes/nodeId1,nodeId2/info/jvm,process

# return all the information of only nodeId1 and nodeId2
GET /_nodes/nodeId1,nodeId2/_all</pre>
</div>
<div class="console_widget" data-snippet="snippets/1404.console"></div>
<p>The <code class="literal">_all</code> flag can be set to return all the information - or you can omit it.</p>
<div class="section">
<div class="titlepage"><div><div>
<h4 class="title">
<a id="cluster-nodes-info-api-example-plugins"></a>Example for plugins metric<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cluster/nodes-info.asciidoc">edit</a>
</h4>
</div></div></div>
<p>If <code class="literal">plugins</code> is specified, the result will contain details about the installed
plugins and modules:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET /_nodes/plugins</pre>
</div>
<div class="console_widget" data-snippet="snippets/1405.console"></div>
<p>The API returns the following response:</p>
<div class="pre_wrapper lang-console-result">
<pre class="programlisting prettyprint lang-console-result">{
  "_nodes": ...
  "cluster_name": "elasticsearch",
  "nodes": {
    "USpTGYaBSIKbgSUJR2Z9lg": {
      "name": "node-0",
      "transport_address": "192.168.17:9300",
      "host": "node-0.elastic.co",
      "ip": "192.168.17",
      "version": "{version}",
      "build_flavor": "{build_flavor}",
      "build_type": "{build_type}",
      "build_hash": "587409e",
      "roles": [
        "master",
        "data",
        "ingest"
      ],
      "attributes": {},
      "plugins": [
        {
          "name": "analysis-icu",
          "version": "{version}",
          "description": "The ICU Analysis plugin integrates Lucene ICU module into elasticsearch, adding ICU relates analysis components.",
          "classname": "org.elasticsearch.plugin.analysis.icu.AnalysisICUPlugin",
          "has_native_controller": false
        }
      ],
      "modules": [
        {
          "name": "lang-painless",
          "version": "{version}",
          "description": "An easy, safe and fast scripting language for Elasticsearch",
          "classname": "org.elasticsearch.painless.PainlessPlugin",
          "has_native_controller": false
        }
      ]
    }
  }
}</pre>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h4 class="title">
<a id="cluster-nodes-info-api-example-ingest"></a>Example for ingest metric<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cluster/nodes-info.asciidoc">edit</a>
</h4>
</div></div></div>
<p>If <code class="literal">ingest</code> is specified, the response contains details about the available
processors per node:</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET /_nodes/ingest</pre>
</div>
<div class="console_widget" data-snippet="snippets/1406.console"></div>
<p>The API returns the following response:</p>
<div class="pre_wrapper lang-console-result">
<pre class="programlisting prettyprint lang-console-result">{
  "_nodes": ...
  "cluster_name": "elasticsearch",
  "nodes": {
    "USpTGYaBSIKbgSUJR2Z9lg": {
      "name": "node-0",
      "transport_address": "192.168.17:9300",
      "host": "node-0.elastic.co",
      "ip": "192.168.17",
      "version": "{version}",
      "build_flavor": "{build_flavor}",
      "build_type": "{build_type}",
      "build_hash": "587409e",
      "roles": [],
      "attributes": {},
      "ingest": {
        "processors": [
          {
            "type": "date"
          },
          {
            "type": "uppercase"
          },
          {
            "type": "set"
          },
          {
            "type": "lowercase"
          },
          {
            "type": "gsub"
          },
          {
            "type": "convert"
          },
          {
            "type": "remove"
          },
          {
            "type": "fail"
          },
          {
            "type": "foreach"
          },
          {
            "type": "split"
          },
          {
            "type": "trim"
          },
          {
            "type": "rename"
          },
          {
            "type": "join"
          },
          {
            "type": "append"
          }
        ]
      }
    }
  }
}</pre>
</div>
</div>

</div>

</div>
<div class="navfooter">
<span class="prev">
<a href="cluster-nodes-hot-threads.html">« Nodes hot threads API</a>
</span>
<span class="next">
<a href="cluster-nodes-reload-secure-settings.html">Nodes reload secure settings API »</a>
</span>
</div>
</div>

                  <!-- end body -->
                        </div>
                        <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                        
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </section>
</div>
<script src="../static/cn.js"></script>
</body>
</html>